/**
 * 与用户有关的所有api均写在此service.ts文件中，方便公共api复用
 * 如：query*开头的api，为查询用户，查询部门，用来动态填充select或者treeselect的option的数据接口
 */

import { request } from 'umi';

// 获取验证码
export async function getVerityCode(data: Record<string, any>, options?: Record<string, any>) {
  return request('/api/user/verityCode', {
    data,
    method: 'POST',
    ...(options || {}),
  });
}

// 恢复更新密码
export async function recoverPassword(data: Record<string, any>, options?: Record<string, any>) {
  return request('/api/user/recoverPassword', {
    data,
    method: 'POST',
    ...(options || {}),
  });
}

// 初次登录，强制用户修改密码
export async function forceChangePassword(data: Record<string, any>, options?: Record<string, any>) {
  return request('/api/user/firstLogin', {
    data,
    method: 'POST',
    ...(options || {}),
  });
}
